
//页面状态相关
let status = {
  sku:'',
  modalImage:{
    isShow:false,
    url:'',
  },
  modalRefund:{
    isShow:false,
    isLoading: false,
    productId:'',
    refundInfo:{
      refundCount:0,
      refundAmount:0,
      refundNo:'',
    },
  },
  modalAdd_cai:{//采购单
    isShow:false,
    isLoading: false,
  },
  modalAdd_tui:{//退货单
    isShow:false,
    isLoading: false,
  },
  modalAdd_bu:{//补货单
    isShow:false,
    isLoading: false,
  },
  modalAdd_huan:{//换货单
    isShow:false,
    isLoading: false,
  },
  productAdd:{
    isShow:false,
    isLoading: false,
  },
  joinPurchaseAdd:{
    isShow:false,
    isLoading: false,
    title:'加入采购单',
    label1:'采购产品',
    label2:'采购单',
  },
  ruleValidate: {
    innerName: [
      { required: true, message: '内部名称不能为空', trigger: 'blur' },
    ],
    orderPurchaseId: [
      { required: true, message: '请选择采购单', trigger: 'change' },
    ],
    // pay: [
    //   { required: true,type:'number', message: '支出金额不能为空', trigger: 'blur' },
    // ],
    // income: [
    //   { required: true,type:'number', message: '支入金额不能为空', trigger: 'blur' },
    // ],
  },
  refundValidate: {
    refundNo: [
      { required: true, message: '退款单号不能为空', trigger: 'blur' },
    ],
    refundAmount: [
      { required: true,type:'number', message: '退款金额不能为空', trigger: 'blur' },
    ],
    refundCount: [
      { required: true,type:'number', message: '退款数量不能为空', trigger: 'blur' },
    ],
  },
};

// 页面的数据源
let data = {
  orderPurchase:{
    id:'',
    orderId:'',
    source:'1',
    type:'1',
    innerName:'',
    recipient:'',
    innerNote:'',
    purchaseNo:'',
    purchaseAmount:0,
    purchaseStatus:'1',
  },
  orderPurchaseProduct:{
    id:'',
    orderPurchaseId:'',
    productId:'',
    productName:'',
    productCode:'',
    zipImage:'',
    note:'',
    purchaseCount:0,
    index:0,
    isAll:1,
    refundInfo:{
      refundCount:0,
      refundAmount:0,
      refundNo:'',
    },
    colorList:[],
  },
};


export  default  {
  tStatus: status,
  tData: data,
};

